import React from "react";

export default class Form extends React.Component {
    state = {
        username: "",
    }
onUsernameChenge=e=>{
    this.setState({username:e.target.value});
}
    render() {
        const {username} = this.state;
        return <div>
            <input type="text"  onChange={this.onUsernameChenge}
            value={username}
            placeholder="用户名"/>
            <input type="submit" value="提交"/>
            {this.props.windowWidth}
        </div>
    }
}